from django.urls import path, include
from rest_framework import routers

from account.controllers import auth
from account.controllers.user import UserViewSet
from account.controllers import permission
from account.controllers.role import RoleViewSet


router = routers.DefaultRouter(trailing_slash=False)
router.register(r'users', UserViewSet)
router.register(r'roles', RoleViewSet)


urlpatterns = [
    path(r'', include(router.urls)),
    path(r'auth/login', auth.login),
    path(r'auth/logout', auth.logout),
    path(r'permissions/modules', permission.modules),
    path(r'permissions/list', permission.list),
]
